﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using WebReference;


public partial class Admin_Previous_Pages_PreGasComposition : System.Web.UI.Page
{
    Service objService = new Service();

    protected void Page_Load(object sender, EventArgs e)
    {
        bindDataGrid();
    }
    private void bindDataGrid()
    {
        DataSet ds = new DataSet();
        ds = objService.RunSQLQuery("Select g.id,ex.ExperimentName,g.H2,g.CO,g.CO2,g.CH4,g.C2H2,g.C2H4,g.C2H6,g.N2,g.GCV,g.Tar from gascomp as g,experiment as ex where g.experiment_id=ex.experiment_id");
        dgGasComp.DataSource = ds;
        dgGasComp.DataBind();
    }

    protected void dgGasComp_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        dgGasComp.PageIndex = e.NewPageIndex;
        bindDataGrid();
    }
}
